<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>Title</title>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css">
</head>
<body>

<div class="container" style="max-width: 700px;margin-top: 50px">
    <div class="well">
        <form action="#" th:action="@{/books}" method="post">
            <input type="hidden" th:value="${book.id}" name="id">
            <div class="form-group">
                <label for="nameID">书名</label>
                <input type="text" name="name" id="nameID" class="form-control" th:field="${book.name}">
            </div>

            <div class="form-group">
                <label for="authorID">作者</label>
                <input type="text" name="author" id="authorID" th:field="${book.author}" class="form-control">
            </div>

            <div class="form-group">
                <label for="descriptionID">说明</label>
                <input type="text" name="description" id="descriptionID" th:field="${book.description}"
                       class="form-control">
            </div>

            <div class="form-group">
                <label for="statusID">状态</label>
                <select name="status" id="statusID" class="form-control">
                    <option value="0" th:selected="(${book.status}=='0')">想读</option>
                    <option value="1" th:selected="(${book.status}=='1')">在读</option>
                    <option value="2" th:selected="(${book.status}=='2')">已读</option>
                </select>
            </div>
            <p class="text-center">
                <button type="submit" class="btn btn-primary">提交</button>
                <a href="javascript:history.go(-1)" class="btn btn-default">返回</a>
            </p>

        </form>
    </div>
</div>


<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js"></script>
</body>
</html>